/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package multiface.awwadco.jpa;

import java.io.Serializable;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.Lob;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.xml.bind.annotation.XmlRootElement;

/**
 *
 * @author Diego64
 */
@Entity
@Table(name = "opzioni")
@XmlRootElement
@NamedQueries({
    @NamedQuery(name = "Opzioni.findAll", query = "SELECT o FROM Opzioni o"),
    @NamedQuery(name = "Opzioni.findByIdopzioni", query = "SELECT o FROM Opzioni o WHERE o.idopzioni = :idopzioni"),
    @NamedQuery(name = "Opzioni.findByEmailContatto", query = "SELECT o FROM Opzioni o WHERE o.emailContatto = :emailContatto"),
    @NamedQuery(name = "Opzioni.findBySmtpHost", query = "SELECT o FROM Opzioni o WHERE o.smtpHost = :smtpHost"),
    @NamedQuery(name = "Opzioni.findBySmtpUser", query = "SELECT o FROM Opzioni o WHERE o.smtpUser = :smtpUser"),
    @NamedQuery(name = "Opzioni.findBySmtpPassword", query = "SELECT o FROM Opzioni o WHERE o.smtpPassword = :smtpPassword"),
    @NamedQuery(name = "Opzioni.findByMaxRecordPag", query = "SELECT o FROM Opzioni o WHERE o.maxRecordPag = :maxRecordPag"),
    @NamedQuery(name = "Opzioni.findByMaxRecordPagAdmin", query = "SELECT o FROM Opzioni o WHERE o.maxRecordPagAdmin = :maxRecordPagAdmin")})
public class Opzioni implements Serializable {
    @Basic(optional = false)
    @Column(name = "smtp_port")
    private int smtpPort;
    @Basic(optional = false)
    @Column(name = "smtp_strategy")
    private String smtpStrategy;
    private static final long serialVersionUID = 1L;
    @Id
    @GeneratedValue(strategy = GenerationType.IDENTITY)
    @Basic(optional = false)
    @Column(name = "idopzioni")
    private Integer idopzioni;
    @Basic(optional = false)
    @Column(name = "email_contatto")
    private String emailContatto;
    @Basic(optional = false)
    @Column(name = "smtp_host")
    private String smtpHost;
    @Column(name = "smtp_user")
    private String smtpUser;
    @Column(name = "smtp_password")
    private String smtpPassword;
    @Basic(optional = false)
    @Column(name = "max_record_pag")
    private int maxRecordPag;
    @Basic(optional = false)
    @Column(name = "max_record_pag_admin")
    private int maxRecordPagAdmin;
    @Basic(optional = false)
    @Lob
    @Column(name = "auto_title_news_promo")
    private String autoTitleNewsPromo;
    @Basic(optional = false)
    @Lob
    @Column(name = "auto_text_news_promo")
    private String autoTextNewsPromo;

    public Opzioni() {
    }

    public Opzioni(Integer idopzioni) {
        this.idopzioni = idopzioni;
    }

    public Opzioni(Integer idopzioni, String emailContatto, String smtpHost, int maxRecordPag, int maxRecordPagAdmin, String autoTitleNewsPromo, String autoTextNewsPromo) {
        this.idopzioni = idopzioni;
        this.emailContatto = emailContatto;
        this.smtpHost = smtpHost;
        this.maxRecordPag = maxRecordPag;
        this.maxRecordPagAdmin = maxRecordPagAdmin;
        this.autoTitleNewsPromo = autoTitleNewsPromo;
        this.autoTextNewsPromo = autoTextNewsPromo;
    }

    public Integer getIdopzioni() {
        return idopzioni;
    }

    public void setIdopzioni(Integer idopzioni) {
        this.idopzioni = idopzioni;
    }

    public String getEmailContatto() {
        return emailContatto;
    }

    public void setEmailContatto(String emailContatto) {
        this.emailContatto = emailContatto;
    }

    public String getSmtpHost() {
        return smtpHost;
    }

    public void setSmtpHost(String smtpHost) {
        this.smtpHost = smtpHost;
    }

    public String getSmtpUser() {
        return smtpUser;
    }

    public void setSmtpUser(String smtpUser) {
        this.smtpUser = smtpUser;
    }

    public String getSmtpPassword() {
        return smtpPassword;
    }

    public void setSmtpPassword(String smtpPassword) {
        this.smtpPassword = smtpPassword;
    }

    public int getMaxRecordPag() {
        return maxRecordPag;
    }

    public void setMaxRecordPag(int maxRecordPag) {
        this.maxRecordPag = maxRecordPag;
    }

    public int getMaxRecordPagAdmin() {
        return maxRecordPagAdmin;
    }

    public void setMaxRecordPagAdmin(int maxRecordPagAdmin) {
        this.maxRecordPagAdmin = maxRecordPagAdmin;
    }

    public String getAutoTitleNewsPromo() {
        return autoTitleNewsPromo;
    }

    public void setAutoTitleNewsPromo(String autoTitleNewsPromo) {
        this.autoTitleNewsPromo = autoTitleNewsPromo;
    }

    public String getAutoTextNewsPromo() {
        return autoTextNewsPromo;
    }

    public void setAutoTextNewsPromo(String autoTextNewsPromo) {
        this.autoTextNewsPromo = autoTextNewsPromo;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idopzioni != null ? idopzioni.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof Opzioni)) {
            return false;
        }
        Opzioni other = (Opzioni) object;
        if ((this.idopzioni == null && other.idopzioni != null) || (this.idopzioni != null && !this.idopzioni.equals(other.idopzioni))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "multiface.awwadco.jpa.Opzioni[ idopzioni=" + idopzioni + " ]";
    }

    public int getSmtpPort() {
        return smtpPort;
    }

    public void setSmtpPort(int smtpPort) {
        this.smtpPort = smtpPort;
    }

    public String getSmtpStrategy() {
        return smtpStrategy;
    }

    public void setSmtpStrategy(String smtpStrategy) {
        this.smtpStrategy = smtpStrategy;
    }
    
}
